<?php

require_once($CFG->wwwroot."/mod/podcast/lib.php");

?>
<form method="post" action="module.php" name="form">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>">

<table cellpadding=9 cellspacing=0 >
<tr valign=top>
    <td colspan = 3 align=center><strong><?php print_string("configuration","podcast") ?></strong></td>
</tr>
<tr valign=top>
        <td align=right><?php print_string("podcast_directory","podcast") ?> :</td>
        <td>
    <?php
		$writable1 = true;
		$writable2 = true;
        if (!is_writable( $CFG->dirroot."/mod/podcast/publication" ) )
			$writable1 = false;
		if (!is_writable( $CFG->dirroot."/mod/podcast/media" ) )
			$writable2 = false;
	?>
	</td>
    <td>
  	<span style="font-size:0.8em;font-weigth:bold;
	<?php
	if ($writable1)
		echo 'color:green;">'.get_string('writable_directory_publication','podcast');
	else
		echo 'color:red;">'.get_string('nowritable_directory_publication','podcast');
	?>
	</span>
	<br />
	<span style="font-size:0.8em;font-weigth:bold;
	<?php
	if ($writable2)
		echo 'color:green;">'.get_string('writable_directory_media','podcast');
	else
		echo 'color:red;">'.get_string('nowritable_directory_media','podcast');
	?>
	</span>
	</td>
</tr>
<tr valign=top>
        <td align=right><?php print_string("extensions","podcast") ?> :
		<br /><?php print_string("extension_empty","podcast") ?></td>
        <td>
    <?php
        if (!isset($CFG->podcast_extensions) || $CFG->podcast_extensions == "") {
			$form->podcast_extensions = "";
		} else {
			$form->podcast_extensions = implode(", ",get_podcast_limit_mimetypes(false));
		}
	?>
	</td>
    <td>
  	<input name="podcast_extensions" type="text" maxsize="255" size="30" value="<?php p($form->podcast_extensions) ?>" /><br /><?php print_string("setextensions","podcast") ?>
   </td>
</tr>
<tr valign=top>
        <td align=right><?php print_string("videosize","podcast") ?> :</td>
        <td>
    <?php
        if (!isset($CFG->podcast_width) || $CFG->podcast_width == "") {
			$form->podcast_width = "400";
		} else {
			$form->podcast_width = $CFG->podcast_width;
		}
		if (!isset($CFG->podcast_height) || $CFG->podcast_height == "") {

			$form->podcast_height = "300";
		} else {
			$form->podcast_height = $CFG->podcast_height;
		}
	?>
	</td>
    <td>
<?php print_string("width","podcast")   ?><input name="podcast_width" type="text" size="6" maxsize="3" value="<?php p($form->podcast_width) ?>" /> px 
<?php print_string("height","podcast") ?><input name="podcast_height" type="text" size="6" maxsize="3" value="<?php p($form->podcast_height) ?>" /> px
   </td>
</tr>
<tr valign="top">
<td colspan="3">
</tr>
<tr>
    <td colspan=3 align=center>
        <input type="submit" value="<?php print_string("savechanges") ?>" /></td>
</tr>
</table>

</form>
